/*
 * Copyright (c) 2018.
 * http://www.ulabcare.com
 */

package com.mt.roll.gateway.feign;

import com.mt.roll.gateway.feign.fallback.PassportServiceFallback;
import com.mt.roll.core.dto.LoginUser;
import com.mt.roll.core.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 统一用户服务
 *
 * @author jiff
 * @date 2018/11/1
 * @since 1.0
 */
@FeignClient(value = "roll-passport", fallback = PassportServiceFallback.class)
public interface PassportService {
    /**
     * 请求资源鉴权
     *
     * @param url    请求地址
     * @param method 请求方法
     * @return
     */
    @PostMapping("authorization")
    R<LoginUser> authorization(@RequestParam("url") String url, @RequestParam("method") String method);
}
